package onpenfeign.com.kc.controller;

import common.common.Util.ResponseBean;
import onpenfeign.com.kc.service.CommonFeign;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

@RestController
public class PersonalController {

    @Resource
    private CommonFeign commonFeign;

    @PostMapping("/personal/addsecurity")
    public ResponseBean addsecurity(@RequestBody String json){
        return commonFeign.addSecurity(json);
    }

    @RequestMapping(value = "/personal/updateavatar",consumes = MediaType.MULTIPART_FORM_DATA_VALUE,method = RequestMethod.POST)
    public ResponseBean updateavatar(MultipartFile file, HttpServletRequest request){
        return commonFeign.updateavatar(file);
    }
}
